EventAction<'T>Union
PackageFCQRS
Defines the possible actions an aggregate or saga actor can take after processing a command or event.
<typeparam name="'T">The type of the event payload associated with the action (e.g., for PersistEvent).</typeparam>
Specification
Kind
Union
Members
24
Examples
0
IsIgnoreEventSignature
this.IsIgnoreEvent
IsUnstashSignature
this.IsUnstash
IsRunAsyncSignature
this.IsRunAsync
IsStashSignature
this.IsStash
IsUnhandledEventSignature
this.IsUnhandledEvent
Summary
| Name | Signature | Synopsis |
|---|---|---|
| IsIgnoreEvent | this.IsIgnoreEvent | No description available. |
| IsUnstash | this.IsUnstash | No description available. |
| IsRunAsync | this.IsRunAsync | No description available. |
| IsStash | this.IsStash | No description available. |
| IsUnhandledEvent | this.IsUnhandledEvent | No description available. |
| IsPersistAndSnapshot | this.IsPersistAndSnapshot | No description available. |
| IsPersistAllEvents | this.IsPersistAllEvents | No description available. |
| IsDeferEvent | this.IsDeferEvent | No description available. |
| IsPublishEvent | this.IsPublishEvent | No description available. |
| IsUnstashAll | this.IsUnstashAll | No description available. |
| IsStateChangedEvent | this.IsStateChangedEvent | No description available. |
| IsPersistEvent | this.IsPersistEvent | No description available. |
| PersistEvent | PersistEvent 'T | Persist the event to the journal. |
| PersistAllEvents | PersistAllEvents 'T list | Persist several events from one command as a single journal AtomicWrite: all land or none do (one DB transaction in the SQL plugins), and no state update, publish or saga wake-up happens until the whole batch is durable. |
| PersistAndSnapshot | PersistAndSnapshot 'T | Persist the event and, once it is durable and folded, immediately save a snapshot — a manual checkpoint, independent of the SnapshotPolicy cadence. |
| DeferEvent | DeferEvent 'T | Publish and fold the event in the live actor without storing it or incrementing the persisted version. |
| PublishEvent | PublishEvent Event<'T> | Publish the event immediately to the mediator without persisting it. |
| IgnoreEvent | IgnoreEvent | Ignore the event or command completely. |
| UnhandledEvent | UnhandledEvent | Indicate that the command or event could not be handled in the current state. |
| StateChangedEvent | StateChangedEvent 'T | Indicate that the state of a saga has changed (used internally by sagas for persistence). |
| Stash | Stash EventAction<'T> | No description available. |
| Unstash | Unstash EventAction<'T> | No description available. |
| UnstashAll | UnstashAll EventAction<'T> | No description available. |
| RunAsync | RunAsync obj | Dispatch an async side effect (e.g. |
Persist the event to the journal. The actor's state will be updated using the event handler *after* persistence succeeds.
Parameters
| Name | Type | Description |
|---|---|---|
| Item | 'T |
Returns
unit
Persist several events from one command as a single journal AtomicWrite:
all land or none do (one DB transaction in the SQL plugins), and no state
update, publish or saga wake-up happens until the whole batch is durable.
Versions are allocated sequentially. Atomic for THIS aggregate instance
only — atomicity across aggregates is saga territory. Note the read side
still projects the batch event-by-event (durability is atomic,
read-model visibility is not).
Parameters
| Name | Type | Description |
|---|---|---|
| Item | 'T list |
Returns
unit
Persist the event and, once it is durable and folded, immediately save a
snapshot — a manual checkpoint, independent of the SnapshotPolicy cadence.
Parameters
| Name | Type | Description |
|---|---|---|
| Item | 'T |
Returns
unit
Publish and fold the event in the live actor without storing it or incrementing the persisted version.
Parameters
| Name | Type | Description |
|---|---|---|
| Item | 'T |
Returns
unit
Publish the event immediately to the mediator without persisting it. The actor's state is not updated.
Parameters
| Name | Type | Description |
|---|---|---|
| Item | Event<'T> |
Returns
unit
Ignore the event or command completely. No persistence, publishing, or state update occurs.
Returns
unit
Indicate that the command or event could not be handled in the current state.
Returns
unit
Indicate that the state of a saga has changed (used internally by sagas for persistence).
Parameters
| Name | Type | Description |
|---|---|---|
| Item | 'T |
Returns
unit
Parameters
| Name | Type | Description |
|---|---|---|
| Item | EventAction<'T> |
Returns
unit
Dispatch an async side effect (e.g. an AI/oracle read) as a "mini saga"
without the saga's persistence ceremony. The payload is an INSPECTABLE
DATA description of the effect (boxed) — NOT a closure — so `decide`
stays a pure `(command, state) -> effect` function you can unit-test by
asserting `decide cmd state = RunAsync (box (ClusterThemes texts))`
without any runtime. The oracle lives in the runner registered at
`Fcqrs.aggregateWithEffects`, which maps the description to a command;
that command is sent back to THIS aggregate (reusing the originating
CID) and re-enters `decide`, re-validated against current state.
EPHEMERAL: the in-flight work is process state, NOT journaled. A crash,
restart, or shard rebalance while it runs loses it SILENTLY — nothing
re-issues it. Use this only when that loss is tolerable; when the result
MUST survive a crash, use a saga (which persists its intent).
TOTAL: the registered runner must map every outcome (oracle error,
timeout) to a command (e.g. `ClusteringFailed`), never let an exception
escape — `Fcqrs.total` helps. An escaping exception fail-fasts the
process, like a throwing fold.
Parameters
| Name | Type | Description |
|---|---|---|
| Item | obj |
Returns
unit